These are the "core" statements, very similar to the other BASIC dialects.
Generates a beep sound.
Notes:
BEGIN
Statement(s)
END
Entry point and last instruction of the program.
Notes:
Break program execution (for debugging purposes...)
Call an assembler-like subroutine at address v|n in the code stack.
Notes:
The program execution will chain to the "NameOfProgram.ibas" given in t, starting at the BEGIN statement of "NameOfProgram".
Notes:
Clear all A-Z NumVars (set to 0) and A$-Z$ CharVars (set to empty text string ""), a range of Numvars only, or a range of CharVars only
Define c as a text constant.
Notes:
CONST v=n
Define v as a numerical constant.
Notes:
Decrements v by one unit (equivalent to v=v-1).
$ DIM %var%|%var$[, %var%|%var$] [...]
Defines one or several custom Number or Text variable(s), in addition to A-Z and A$-Z$ which are automatically defined.
Notes:
DO
Statement(s)
LOOP v|n/c|t TestOper v|n/c|t
DO implements a number of loops. The program will exit from the loop when the condition after the LOOP statement is met.
Notes:
GOTO branches program execution to the specified label
GOSUB label
GOSUB initiates a subroutine call to the specified label. The subroutine must end with RETURN. It will then carry on with the statement following the GOSUB one.
label:
Statement(s)
RETURN
FOR v = v|n1 [DOWN]TO v|n2 [STEP v|n3]
Statement(s)
NEXT
FOR initiates a FOR/NEXT loop with the variable v initially set to v|n1 and incrementing (TO) or decrementing (DOWNTO) in v|n3 steps (default is 1 for TO and -1 for DOWNTO) until v equals v|n2.
IF v|n/c|t TestOper v|n/c|t Statement
IF evaluates the given expression and performs the Statement if it is true.
Notes:
IF v|n/c|t TestOper v|n/c|t THEN Statement
[ELSE Statement]
END IF
IF evaluates the given and performs the THEN statement if it is true or (optionally) the ELSE statement if it is FALSE, ending with END IF.
Notes:
| IF A=1 THEN B=2:C=3 ELSE B=3 END IF |
IF A=1 THEN B=2:C=3 ELSE B=3 END IF |
Increments v by one unit (equivalent to v=v+1).
[LET] c = c|t|s [+ c|t|s] [...]
[LET] v = v|n|f [MathOper v|n|f] [...]
LET assigns the value of the expression after the "=" sign to the variable c/v. iziBasic supports implied LET statements, meaning that the LET statement is optional.
Notes:
Puts value v|n2 at address v|n1 in the code stack
Notes:
Returns top Text stack value in the c variable, or the top Number stack value in the v variable. The Text or Number stack is then decremented by one unit, meaning that it then points to the last but one top value.
Increments the Text or Number stack by one unit. It then puts the c|t value to the Text stack, or the v|n value to the Number stack.
REM and ' allow remarks to be included in a program. As currently implemented, the entire remaining text on a line following REM (or ') is ignored by the iziBasic compiler.
Notes:
REPEAT
Statement(s)
UNTIL v|n/c|t TestOper v|n/c|t
Equivalent to DO/LOOP.
SELECT CASE v|c
CASE n1|t1
Statement
[...]
[CASE nn|tn
Statement]
[CASE ELSE
Statement]
END SELECT
SELECT CASE introduces a multi-line conditional selection statement. The v (or c) variable given as the argument to SELECT CASE will be evaluated against numerical (or text) values by the CASE statements following. If no evaluation was successful, the CASE ELSE statement will be executed. The SELECT CASE statement concludes with an END SELECT statement
Notes:
Does nothing during v|n seconds
Notes:
As its name states it, SWAP swaps the values of two variables.
WHILE v|n/c|t TestOper v|n/c|t
Statement
WEND
WHILE implements a number of loops, delimitated with the WEND statement. The program will exit from the loop as soon as the condition after the WHILE statement is met.
Notes: